Private allocated networks over shared communications infrastructure

ABSTRACT

Methods and systems for implementing private allocated networks in a virtual infrastructure are presented. One method operation creates virtual switches in one or more hosts in the virtual infrastructure. Each port in the virtual switches is associated with a private allocated network (PAN) from a group of possible PANs. In one embodiment, one or more PANs share the same physical media for data transmission. The intranet traffic within each PAN is not visible to nodes that are not connected to the each PAN. In another operation, the method defines addressing mode tables for the intranet traffic within each PAN. The entries in the addressing mode tables define addressing functions for routing the intranet traffic between the virtual switches, and different types of addressing functions are supported by the virtual switches.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No.12/510,072 (Attorney Docket No. A355), filed Jul. 27, 2009, and entitled“AUTOMATED NETWORK CONFIGURATION OF VIRTUAL MACHINES IN A VIRTUAL LABENVIRONMENT”; and U.S. patent application Ser. No. 12/510,135 (AttorneyDocket No. A366), filed Jul. 27, 2009, and entitled “MANAGEMENT ANDIMPLEMENTATION OF ENCLOSED LOCAL NETWORKS IN A VIRTUAL LAB”, which areincorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to methods and systems for implementingprivate allocated networks (PAN), and more particularly, methods andsystems for implementing isolated PANs that share the same communicationphysical media.

DESCRIPTION OF THE RELATED ART

Virtualization of computer resources generally involves abstractingcomputer hardware, which essentially isolates operating systems andapplications from underlying hardware. Hardware is therefore sharedamong multiple operating systems and applications wherein each operatingsystem and its corresponding applications are isolated in correspondingvirtual machines (VM) and wherein each VM is a complete executionenvironment. As a result, hardware can be more efficiently utilized.

The virtualization of computer resources sometimes requires thevirtualization of networking resources. To create a private network in avirtual infrastructure means that a set of virtual machines haveexclusive access to this private network. However, virtual machines canbe located in multiple hosts that may be connected to different physicalnetworks. Trying to impose a private network on a distributedenvironment encompassing multiple physical networks is a complexproblem. Further, sending a broadcast message in a private networkpresents two problems. First, the broadcast may be received by hostswhich do not host any VMs in the private network, thus reducing thescalability of the entire distributed system. Second, if hosts are notlocated on adjacent layer 2 networks, the broadcast may not reach allhosts with VMs in the private network.

Virtual Local Area Networks (VLAN) are sometimes used to implementdistributed networks for a set of computing resources that are notconnected to one physical network. A VLAN is a group of hosts thatcommunicate as if they were attached to the Broadcast domain, regardlessof their physical location. A VLAN has the same attributes as a physicalLocal Area Network (LAN), but the VLAN allows for end stations to begrouped together even if the end stations are not located on the samenetwork switch. Network reconfiguration can be done through softwareinstead of by physically relocating devices. Routers in VLAN topologiesprovide broadcast filtering, security, address summarization, andtraffic flow management. However, VLANs only offer encapsulation and, bydefinition, switches may not bridge traffic between VLANs as it wouldviolate the integrity of the VLAN broadcast domain. Further, VLANs arenot easily programmable by a centralized virtual infrastructure manager.

SUMMARY

Embodiments of the present invention provide methods and systems forimplementing private allocated networks in a virtual infrastructure arepresented. One method operation creates virtual switches in one or morehosts in the virtual infrastructure. Each port in the virtual switchesis associated with a private allocated network (PAN) from a group ofpossible PANs. The intranet traffic within each PAN is not visible tonodes that are not connected to the each PAN. In another operation, themethod defines addressing mode tables for the intranet traffic withineach PAN. The entries in the addressing mode tables define addressingfunctions for routing the intranet traffic between the virtual switches,and types of addressing functions are supported by the virtual switches.

It should be appreciated that the present invention can be implementedin numerous ways, such as a process, an apparatus, a system, a device ora method on a computer readable medium. Several inventive embodiments ofthe present invention are described below.

In one embodiment, a method includes an operation for sending a packetfrom a virtual machine to a virtual switch in a host where the virtualmachine is executing. The packet is sent from a network interface in thevirtual machine connected to a PAN. Further, the method checks anaddressing mode table in the virtual switch to determine an addressingfunction corresponding to a destination node for the packet. Theaddressing function is defined for muting intranet PAN traffic betweenvirtual switches connected to the PAN, where different types ofaddressing functions are supported by each virtual switch. Anothermethod operation sends the packet to the destination using thedetermined addressing function.

In another embodiment, a virtual switch in a first host for implementingprivate allocated networks in a virtual infrastructure is defined. Thevirtual switch includes a first group of ports, a second group of ports,and an addressing mode table. The first group of ports is associatedwith a first PAN, and the second group of ports is associated with asecond PAN. The first and the second PAN share the same physical mediafor data transmission, and the intranet traffic within the first PAN isnot visible to nodes that are not directly connected to the first PAN.The addressing mode table is characterized for the intranet trafficwithin the first PAN. An entry in the addressing mode table defines anaddressing function for routing intranet traffic originated at the firstgroup of ports, where layer 2 address translation is used for intranettraffic from the first group of ports to a virtual machine in a secondhost connected to the same physical media. Layer 3 encapsulation is usedfor intranet traffic from the first group of ports to a virtual machinein a third host not connected to the same physical media.

In yet another embodiment, a system for network communications in avirtual infrastructure includes one or more physical networks and aplurality of hosts connected to the physical networks. Each hostincludes a virtual switch and addressing mode tables. Each port in thevirtual switch is associated with one of a plurality of PANs. Nodes ineach PAN have the same network address associated with the each PAN, andeach port can be associated with any of the PANs. Further, the intranetPAN traffic between two hosts on different physical networks travelsthrough the two different physical networks. The addressing mode tablesare defined for each PAN, where an entry in the addressing mode tabledefines an addressing function for routing the intranet PAN trafficbetween the plurality of hosts. Different types of addressing functionsare supported by the plurality of hosts.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a remote desktop environment including a virtualinfrastructure controller, according to one embodiment.

FIG. 2 depicts one embodiment of the host architecture for instantiatingVirtual Machines (VM) with multiple Virtual Network Interface Cards(VNIC).

FIG. 3 illustrates the implementation of Private Allocated Networks(PAN) in a virtual infrastructure, according to one embodiment.

FIG. 4 illustrates the transmission of PAN packets between hostsconnected to the same physical network, according to one embodiment.

FIG. 5 illustrates the transmission of PAN packets between physicalnetworks and within a host, in accordance with one embodiment.

FIG. 6 depicts the transmission of broadcast packets within a PAN,according to one embodiment.

FIGS. 7A-7B present two embodiments of network addressing mode tables.

FIG. 8 illustrates the process of migrating a VM to a host which has nosupport for the PAN used by the migrating VM, according to oneembodiment.

FIGS. 9A-9B illustrate the implementation of PANs in multiple layers,according to one embodiment.

FIG. 10 shows the process flow for implementing private allocatednetworks in a virtual infrastructure in accordance with one embodimentof the invention.

FIG. 11 is a simplified schematic diagram of a computer system forimplementing embodiments of the present invention.

DETAILED DESCRIPTION

FIG. 1 depicts a remote desktop environment including a virtualinfrastructure controller, according to one embodiment. The environmentdepicted in FIG. 1 includes enterprise servers 102 a-102 b, alsoreferred to herein as hosts, that provide virtual desktop services toremote users 130 a-130 d. Although embodiments are described within avirtual desktop system and virtual machines (VM), the embodimentspresented can be used in environments where several servers are used tosupport processes which can be hosted by any of the servers. Someembodiments below are described with respect to VMs, but the sameprinciples apply to processes running on a multi-host environment.

The architecture of a virtualized computer system is shown in FIG. 1with some components omitted for simplification purposes. Thevirtualized computer system includes VMs 104 a-104 n, and virtualinfrastructure 108. Among other things, virtual infrastructure 108manages the assignment of VMs 104 a-104 n to remote users. As shown inFIG. 1 , each VM includes a Guest Operating System (GOS) supportingapplications running on the GOS. Virtual infrastructure layer 108 alsoincludes Virtual Switch 106 that provides network connectivity servicesto VMs 104 a-104 n. Virtual Infrastructure Controller 132 manages theoperation of the hosts in the infrastructure, which includes allocatingVMs to hosts, migrating VMs between hosts, configuring networks, etc.

As further shown in FIG. 1 , remote users 130 a-130 d utilize devices122, 124, 126 and 128, respectively, which act as clients in the remotedesktop environment. Devices 122, 124, 126 and 128 provide displaypresentation and input/output capabilities associated with VMs 104 a-104n. The devices include Personal Computers (PC) 122 and 128, laptop 124,and a Personal Digital Assistant (PDA) (mobile phone 126). As furthershown in FIG. 1 , the devices can communicate with the hosts over thesame private network 114 as the hosts, or they can communicate with thehosts remotely via network 112.

FIG. 2 depicts one embodiment of the host architecture for instantiatingVMs with multiple Virtual Network Interface Cards (VNIC). Hypervisor204, also referred to as virtual infrastructure layer, manages theassignment of VMs 206 in host 202 to remote users. VM 206 includes GuestOperating System (GOS) 208 and multiple VNICs 210. Each VNIC 210 isconnected to a virtual switch (VSwitch) 212 that provides network switchfunctionality for the network interfaces. VSwitches 212 are connected toa physical NIC device in the host to connect the VMs to network 216.Each of the VNICs and VSwitches are independent, thus a VM can connectto several networks via several VNICs that connect to one or morephysical NIC devices 214. In another embodiment, each VSwitch 212 isconnected to a different physical NIC device, thus each VSwitch 212provides connectivity for networks implemented on the correspondingnetwork attached to the physical NIC device. For example, in theembodiment illustrated in FIG. 2 , physical network 216 carries trafficfor two different networks, Network 1. and Network 4. Network 1 andNetwork 4 are two network overlays operating on the same physicalnetwork 216. VSwitch 212 assigns a set of ports to Network 1 and adifferent set of ports to Network 4, where each set of ports supportsMedia Access Control (MAC) addressing for the corresponding network.Thus, packets from Network 1 coexist with packets from Network 4 on thesame transmission media.

The network overlays are configured to have separate Layer 2 (Ethernet)and Layer 3 (Internet Protocol) addressing from the underlying physicalinfrastructure, allowing a physical network or a PAN to have differentsubnet masks, gateways, and IP address pools from the underlyingphysical network. Further, the PANs may be connected to a virtual routerin order to provide connectivity to the underlying physical networkinfrastructure or another PAN via a gateway or default router.

FIG. 3 illustrates the implementation of Private Allocated Networks in avirtual infrastructure, according to one embodiment. VirtualInfrastructure Controller 302 manages a virtual infrastructure withhosts 1-5 304 a-304 e. Physical Networks PN1 and PN2, together withrouter 308, enable the hosts to communicate and VMs A-R execute on hosts1-5. The administrator of this environment wishes to create multipleprivate networks, also referred to herein as Private Allocated Networks(PAN) or network overlays, which are independent from each other. A PANdefines a layer 2 broadcast domain. In case of an IP PAN network, allthe nodes in the PAN have the same subnet network address and adifferent nodal address. Typically, each PAN is under the control of adifferent administrator. For example, each business unit in a largecorporation may have its own network, or networks are allocated todifferent functions within a company, such as having a network for labtesting completely isolated from networks that run mission-criticaloperations such as order processing. Having independent networks meansthat the addressing schemes within each network can not affect theoperation of other networks, and that the networks are protected fromoutside entities that are not properly authorized to establish a networkconnection. Additionally, each administrator must be free to define theaddressing scheme used in the networks under the control of theadministrator, independently of how other administrators configure theirnetworks. Networking layer 2 and layer 3 addresses can be the same indifferent VMs connected to different PANs, but the overlap must notaffect the normal operation of the VMs, the network, nor the virtualinfrastructure. Having independent networks also means isolation of thephysical infrastructure from the view of each VM. In other PANscenarios, an administrator breaks down a large physical network into aset of smaller networks, or combines small subnets into a large networkwithout having to change the configurations and connections of thenetwork equipment.

In the virtual infrastructure environment of FIG. 3 all hosts runvirtualization software, which is centrally managed. Additionally, allthe nodes are well behaved and controlled. The central management allowsthe implementation of solutions that may be harder to implement on opennetworking environments where the nodes are not controlled by a centralentity. However, the person skilled in the art will readily appreciatethat many of the principles described herein can also be used in opennetworking environments with little or no modification.

There are three basic tools used to implement overlay networks:filtering, encapsulation or address translation, and forwarding. Thefiltering function assigns all traffic to a given overlay or set ofoverlays upon ingress, and prevents traffic from passing betweensegments which must be isolated from one another. The encapsulationfunction prevents unintended routing of packets by the physicalswitching and routing equipment when there is overlapping duplicateaddresses within separate isolated segments. Further, the encapsulationfunction tunnels traffic within a given logical segment across disparatephysical segments. The forwarding function provides feedback to the coreforwarding engine which may make implicit assumptions based on whether asuitable local unicast destination is available or not.

Embodiments of the invention add optimization to the virtualinfrastructure networking stack to enable the virtual infrastructure to:

-   -   Protect the physical network from overlapping MAC and IP        addresses in different administration domains.    -   Divide a large shared physical network into smaller isolated        networks to provide multi-tenancy capabilities. This means        preventing traffic from leaking between isolated networks,        restricting broadcast domains to only the set of physical        switches actually servicing a given isolated network, and        enabling the deployment of a single large layer 2 network with        no spanning tree running at the physical access layer, or with        optimized spanning tree compared to traditional networks because        there is no need for loops built into the network as redundancy        can be handled at the edges by the hypervisors, and there is no        need to run spanning tree over multiple VLANs.    -   Aggregate a collection of separate subnets into a larger logical        network, which can be subdivided to combine multi-tenancy with        availability zones. This aggregation allows the traditional use        of spanning tree for redundancy since each subnet is its own        spanning tree domain. As a result, logical broadcast domains are        stretched beyond physical broadcast boundaries (subnets).    -   Support elastic overlay networks that can “stretch” or        “contract” across L2 and L3 boundaries.    -   Optionally, allows placement of VMs in the virtual        infrastructure so as to improve performance. For example,        Distributed Resource Scheduling (DRS) or other placement        mechanisms can be used to physically collocate VMs in the same        logical private network. As a result, bisectional bandwidth        becomes less critical to the performance of the overall network,        allowing overcommit (or at least less overprovision). In        addition, more aggressive power saving mechanisms can be        implemented for idle switches, and the number of hosts sharing        any one group membership table can be limited.

Virtual infrastructure controller (VIC) 302 allocates unique MACaddresses to each VM's NIC for use in Physical Networks. The PANadministrator allocates MAC addresses to the VMs for internal use withinthe PAN, but ultimately the PAN packets may need to use a physicalnetwork and when the PAN packets travel in the physical network the PANpackets must have unique addresses to avoid delivery problems. VIC 302also associates VMs with the corresponding PANs and pushes addressingmode tables to the hosts of the virtual infrastructure. The addressingmode tables, also referred to as translation tables or lookup tables,are described in more detail below in reference to FIGS. 7A-7B. Inanother embodiment, the addressing mode tables are built by each of thehosts without the cooperation from VIC 302. Hosts 304 a-304 e associateindividually outgoing frames with one of the PANs and decide which PANcorresponds to each received frame. Additionally, the hosts enforce theisolation between PANs and maintain the addressing mode tables.

The approach to implement PANs over one or more physical networks iselastic as embodiments of the invention do not rely on a single approachor method for transferring packets. Different encapsulation andtranslation mechanisms are utilized, including leaving a packetunchanged when the destination of the packet is in the same virtualswitch as the VM transmitting the packet. Further, embodiments of theinvention are compatible with other networking aggregation mechanisms,such as VLANs, because all the operations on packets are performed atthe hosts. While PAN packets are traveling on physical networks, the PANpackets behave as regular network packets. Physical network switches androuters are not aware of the network overlays, and there is no need ofcomplex management of switches and routers, which may be geographicallydispersed or under the management control of multiple entities.

Referring back to FIG. 3 , physical networks PN1 312 and PN2 314 supportconnections to hosts 304 a-304 e and VIC 302. On top of this physicalnetwork infrastructure, six different PANs N1-N6 have been created forthe VMs in the infrastructure. For example, PAN N2 includes VMs 1 inhost 1, A and B in host 2, and E in host 4. The VMs are connected toVSwitches 306 a-306 e, as previously described in FIG. 2 . Although FIG.3 shows one VSwitch per host, there can be more than one VSwitchinstantiated within a host to perform the VSwitch functionality. EachVSwitch assigns ports to one or more PANs implemented in the host. Forexample, VSwitch 306 b has assigned two ports to PAN N2 and four portsto PAN N5. It should be noted, that hosts need not implement all thePANs in the virtual infrastructure, but only the PANs that have VMs inthe host.

VIC 302 allocates PANs to VMs and the ports in the VSwitches where theVMs connect to the PAN. Distributed Virtual Switch 310 in VIC 302 is asymbolic representation of these assignments, where the masterDistributed Virtual Switch 310 has an allocation for all VMs. Each portin Distributed Virtual Switch 310 corresponds to a port in a hostVSwitch, as shown by some of the arrows coming out of DistributedVirtual Switch 310 (not all ports in Distributed Virtual Switch 310 andarrows are shown for clarity).

It should be noted that one advantage of a virtual infrastructure isthat there is no need to artificially constrain broadcasts, mainly usedwhen nodes do not know about each other. In the architecture shown inFIG. 3 , all the nodes can get information about other nodes because ofthe virtual infrastructure layer. For example, a VM can get the Ethernetaddress of another VM from the virtual infrastructure that knows theaddresses of all the VMs. Nevertheless, standard networking methods arealso available, such as using Address Resolution Protocol (ARP).However, other embodiments follow a different approach where the virtualinfrastructure handles all cases of broadcast, and the virtualinfrastructure avoids intruding into the guest OS.

FIG. 4 illustrates the transmission of PAN packets between hostsconnected to the same physical network, according to one embodiment. Thesystem in FIG. 4 is the same system as the one of FIG. 3 , but someelements have been omitted for clarity. When a packet is transmittedfrom VM H to VM I using PAN N1, VSwitch 306 a receives the packet in theport attached to' VM H. VSwitch 306 a examines the layer 2 destinationaddress and determines that the packet is destined to node I, also inPAN N1 and in the same virtual switch. Because the destination is localwithin the VSwitch, the packet is delivered 402 by VSwitch 306 a to theport attached to VM I without changing any data in the packet. Networkbased applications and services which parse beyond the Ethernet headershould not be impacted because there are not any additional data fieldsor headers added to the packet, which is the case when encapsulation isused.

A second scenario includes sending an IP packet from VM M in host 304 cto VM P in host 304 e. Since the destination is in a different host, thepacket must travel through the physical network. As previouslydiscussed, the Ethernet addresses in different PANs may be controlled bydifferent administrators, each with complete freedom to determine how toassign MAC addresses to VMs. This may cause the duplication of MACaddresses, and since a VM's MAC address may not be unique, there must bea mechanism in place to avoid wrongful delivery of packets. This isavoided by assigning a unique MAC address to each VM, which we refer toas the “external” MAC address, and the unique MAC address is used on thephysical networks. The MAC addresses used within each PAN are referredto as the “internal” MAC addresses because the MAC addresses are onlyvalid within the corresponding PAN. This assignment can be performed byVIC 302, as seen in FIG. 3 .

As a result, the packet sent by VM M is received by VSwitch 306 c, whichdetermines that the destination is in the same PAN and in a differenthost. Since the remote host 304 a is in the same physical network PN2,the packet can be sent using MAC address translation. VSwitch 306 cchanges the destination MAC address to VM P's external MAC address andthen sends the packet 404 via network PN2 to VSwitch 306 e, where theprocess is reversed. VSwitch 306 e recognizes that the packet came fromthe physical network and that it is destined to VM P's external address,and VSwitch 306 c then changes the destination address in the packetback to the original “internal” address for VM P in PAN N1. A similarprocess takes place with the source MAC addresses to use externaladdresses in the physical network and internal addresses within the PAN.

Network based applications and services which parse beyond the Ethernetheader should not be impacted in this case either, since additional datafields are not added to the packet. It should be noted that if the hostparticipates in protocols which embed the MAC in the payload, such asAddress Resolution Protocol (ARP), then a translation handler for eachrelevant protocol must be implemented on the host.

Other embodiments may use different ways of sending packets betweenhosts. For example, the packet may be sent from VSwitch 306 c to VSwitch306 e using packet encapsulation. This method may require packetfragmentation because of the added data fields, as well as additionalprocessing to add and deleted the packet extra fields. The importantthing to keep in mind is the flexibility and ability to customize howpackets are send within a PAN. More details are given below on howcustomization takes place by using Addressing Mode Tables described inreference to FIGS. 7A-7B.

FIG. 5 illustrates the transmission of PAN packets between physicalnetworks and within a host, in accordance with one embodiment. When VM Jin PAN N2 sends a packet to V M B also in PAN2, the packet must travelto a different host located on a remote physical network PN1. In oneembodiment, IP encapsulation is used by adding Ethernet and IP headersto the Ethernet packet. Because the packet's destination is VM B,VSwitch 306 determines that the packet needs to be delivered to host 304b. The added IP header includes the IP address of host 304 b as well asother information regarding the encapsulation of the packet, such asreserved bits. In one embodiment, encapsulated packets include metadata(such as explicit PAN identification). In another embodiment, metadatais not used, and PAN identification is implicit in the encapsulationaddress. In both embodiments only hosts which implement the PAN will seethe traffic for the PAN.

The encapsulated IP packet 502 is sent to router 308 (the added Ethernetheader has router 308's Ethernet address for destination), whichforwards the packet to host 304 b. VSwitch 306 b determines that thepacket is encapsulated, removes the encapsulation headers, anddetermines delivery for VM B by examining the Ethernet address in thepacket (VM B's external Ethernet address). It should be noted that theremay be a case when two hosts implement the same PAN, where the two hostsdo not share a connection to a physical network and where there is norouter on the network that can be used to send packets between the twohosts. In this case, a way to communicate the hosts must be found, suchas using an intermediary host with connectivity to both hosts. In thiscase, a packet originating in one host is sent to the intermediary host,which forwards the packet to the destination host. As previouslydiscussed, translation or encapsulation can be used at each leg of thecommunication. In one embodiment, the intermediary host implements thesame PAN as the other two hosts, but in another embodiment, theintermediary does not implement the same PAN and merely acts as aspecial router controlled by the virtual infrastructure.

As previously discussed, PANs are implemented as isolated networks whichdo not require knowledge of the existence of other PANs. However, oneadministrator can configure several PANs and enable communication amongthem. In this case, nodes in one of the PANs are aware of other nodes indifferent PANs and use standard networking protocols to communicate withthese nodes. For example, in the case where VM R in PAN N4 sends apacket to VM P in PAN N1, the virtual infrastructure is able to deliverthis packet by using a virtual router to facilitate the connectionbetween PANs. In different embodiments, the virtual router can belocated in different systems, such as in the source host, in thedestination host, or somewhere else on the network. In the example shownin FIG. 5 , virtual router 508 is located inside host 304 e.

VSwitch 306 e sends the packet 504 received from VM R to virtual router508, which then forwards the packet 506 back to VSwitch 306 e fordelivery to VM P. Since the packet does not have to travel on a physicalnetwork, there is no need for translation or encapsulation. In oneembodiment, the virtual router is implemented as a VM which can performthe usual router functions such as encapsulation, decapsulation, andtranslation. In the case that inter-PAN traffic, that is traffic betweenPANs, requires that a packet traverses at least one physical network,encapsulation or translation can be used as previously described. Wewill refer to intranet PAN traffic herein as traffic whose source anddestination are in the same PAN, which is the same as saying that anintranet PAN packet has source and destination layer 3 addresses fromthe same network (the PAN network).

FIG. 6 depicts the transmission of broadcast packets within a PAN,according to one embodiment. Different types of broadcasts areillustrated in FIG. 6 . The first type is a broadcast from VM B in PANN2. The broadcast must reach all the nodes in PAN N2, which areexecuting in hosts 304 a, 304 b, and 304 d. Since B resides in host 304b, all VMs in host 304 b receive the broadcast from VSwitch 306 b. Thenodes outside host 304 b are reached via multicast. To avoid floodingthe physical networks, all the broadcasts within a PAN are delivered viamulticasts. That is, all the hosts hosting a particular PAN areregistered for a common multicast. This way, VSwitch 306 d receives themulticast from VM B and delivers B's broadcast to all nodes in PAN N2(VM E). Another multicast packet is delivered to VSwitch 306 a (passingthrough router 308), which delivers B's broadcast to all nodes in PAN N2(VM J.) It should also be noted that the implementation may choose tooptimize this case by only sending the encapsulated multicast since thatwill be able to be received by hosts on the local network PN1 as well asthe remote network PN2.

A second broadcast is sent from VM N, which is connected to VSwitch 306c in host 304 c. Since all the VMs for N3 are connected to VSwitch 306c, the virtual switch delivers the broadcast to all the ports configuredfor PAN N3.

A third broadcast is sent from node H on PAN N1. The hosts implementingPAN N1 are 304 a, 304 c, and 304 e, which are connected to the samephysical network PN2. In similar fashion to B's broadcast, the broadcastfrom H is converted into a multicast that includes all the nodes in PANN1. This way, the broadcast is transmitted to VSwitches 306 a, 306 c,and 306 e which deliver the broadcast to N1's nodes (I, M, P, and Q).

Therefore, translating all broadcasts to multicast allows to solve theproblems where the broadcast ranges too wide on L2, that is thebroadcast reaches all the hosts on the physical network causingperformance degradation. Additionally, the broadcasts are cut off at theL3 boundary, so broadcasts do not have to reach hosts without VMsbelonging to the PAN for the broadcast. A protocol such as InternetGroup Management Protocol (IGMP) is used to register the multicastgroups. IGMP is a communications protocol used to manage the membershipof IP multicast groups. IGMP is used by IP hosts and adjacent multicastrouters to establish multicast group memberships.

FIGS. 7A-7B present two embodiments of network addressing mode tables.The addressing mode tables are used to determine how to distributepackets within a PAN. In one embodiment, each entry in the addressingmode table includes a destination key, a function, and an address to usefor the destination. In other embodiments, other fields are included tofurther define the routing of packets or to offer more than one optionfor routing packets within the PAN. FIG. 7A illustrates the

Addressing Mode Table in host 2 304 b (see FIGS. 3-6 ) for PAN N5. Thefirst entry indicates that the destination is a broadcast, that is, allthe nodes in PAN N5. The function associated indicates that delivery ofthe broadcast is done via a multicast, and the address to use is the IPMulticast address determined for PAN N5.

The next entry corresponds to a unicast address for VM C (Layer 2).Since VM C is in host 2, then the packet can be delivered locally. Thus,the corresponding function is “No modification.” The address to be usedis C's unicast address without need for translation or encapsulation.The entry or the unicast L2 address of VM D is similar to the entry forVM C because VM D is also local in host 2.

In another embodiment, the same translation table is used in all thehosts. Since the translation function is only executed when theforwarding mechanism determines that the destination is on another host,the fact that the table contains a translation does not actually meanthat the internal traffic is translated.

For unicast F address, the function determines an address translation atlevel 2 because VM F is in a host that shares the same physical networkwith host 2. As previously described, L2 address translation can be usedto send the packet to VM F and the destination address is VM F'sexternal address, referred to as F′ in FIG. 7A. This is the general casefor unicast addresses in the same physical network.

FIG. 7B illustrates the addressing mode table in host 2 for PAN N2. Someentries are similar to those discussed above in reference to FIG. 7A,but a new type of entry appears in FIG. 7B corresponding to the unicastaddress for VM J. Host 1 where VM is executing is in a differentphysical network than host 2, therefore IP encapsulation is used to sendthe packet across, as previously described in FIG. 5 to send a packetfrom VM J to VM B. The function for this entry specifies IPencapsulation, and the IP address used in the encapsulation header isthe IP address of host 1 in PN2.

In one embodiment, the addressing mode tables, also referred to astranslation tables or address lookup tables, are centrally managed bythe virtual infrastructure controller which downloads them to thedifferent hosts and updates them as changes occur, such as when a VM ismigrated to a different host. In another embodiment, the addressing modetables are managed by each of the hosts, which cooperate with each otherto fill in the corresponding information and to do updates as the VMschange status. In yet another embodiment, the different functions forcreating and updating the tables are divided between the hosts and thevirtual infrastructure controller. For example, the VIC does the initialcreating of the tables, while the hosts update the tables as the VMstatus change over time. It should be noted that in some embodiments,for the case where all the hosts are on the same physical network andonly translation is used, VM migrations never require table updates andthe tables on each host are identical.

Reverse lookup tables exist in each of the host that perform the inversefunction of the addressing mode tables, that is, once a packet arrives,the reverse lookup tables and the corresponding associated reverse logicare used to determine the PAN and final destination of arriving packets.

FIG. 8 illustrates the process of migrating a VM to a host which has nosupport for the PAN used by the migrating VM, according to oneembodiment. One aspect of virtualization is the ability to live migrateworkload transparently from one host computer of a virtualized computersystem to another, where live migration is sometimes referred to asVMotion. With VMotion, work loads can be dynamically balanced among hostcomputers. In addition, VMotion enables hardware maintenance to beperformed without service interruption by migrating a work load off ahost computer that needs to be shut down.

When a VM connected to a PAN is moved to a destination host that has notimplemented the PAN, the destination host and the VSwitch in thedestination host need to add support for the PAN that the VM is using.This means, among other things, obtaining or creating the addressingmode table in the destination host. If the VM moves to a host outsidethe physical network connected to the source host, then encapsulationmay be needed to reach the VM after the migration, and the functions inthe addressing mode tables are adjusted accordingly. Additionally, inthe case where the VM moves to a host outside the physical network wherethe source host resides, the addressing mode tables in other hostsimplementing the PAN need to be updated to reflect the new location ofthe migrating VM. Further yet, if the migrating VM was the last VM forthe PAN in the source host, then there is no VM left connected to thatPAN in the source host and the multicast group for that PAN on that hostcan be terminated after the migration.

Referring now to the scenario of FIG. 8 , VM N is migrating from host802 to host 806. VM N is connected to PAN N3 in VSwitch 804. Host 806does not have support for PAN N3 before VM N's migration. In oneembodiment, VSwitch 808 adds functionality for PAN N3 before migratingVM N. This means reserving ports in VSwitch 808 for PAN N3 and creatingthe addressing mode table for PAN N3. The addressing mode table can beobtained from the Virtual Infrastructure controller or from other host,such as source host 802. The rest of the process for migrating VM N isperformed as usual, and VM N is connected to PAN N3 via VSwitch 808. ForVM N, the migration is transparent and the layer 2 and layer 3 addressesfor VM N have not changed during the migration, because the layer 2address is still the internal layer 2 address for VM N, and the IPaddress of VM N has not changed.

In one embodiment, the Virtual Infrastructure Controller has policiesfor the migration of VMs from one host to another. The policies may bedefined to save energy, increase processing bandwidth, improve resourceavailability, move VMs closer to the user, etc. The policies assess thecosts and benefits associated with a potential move and a decision ismade whether to migrate a VM or not. One of such policies relates to thegoal of having VMs connected to the same PAN execute in as few hosts aspossible. This improves communication speed within the PAN as manypackets will end in the same host or in a host nearby. Additionally, theprocessing required is reduced as most packets may not have to bechanged or only require address translation. Another benefit is thatoverall there will be fewer addressing modes tables in the virtualinfrastructure as hosts, in general, will have to support a fewer numberof PANs .

FIGS. 9A-9B illustrate the implementation of PANs in multiple layers,according to one embodiment. The concept of PANs implemented on top ofphysical networks can be expanded to define PANs implemented on top ofother PANs, thereby forming a stack of PAN layers. This means, that aprivate network can be defined to be implemented on top of anotherprivate network. In one embodiment, this is implemented as a VSwitchthat connects to another VSwitch instead of connecting to a physicalnetwork. In another embodiment, the VSwitch is aware of the differentlayers and. performs all the required functions to send packets out ofthe host into the physical network. For example, the VSwitch would firstuse an addressing mode table for the top layer PAN to obtain a firstmodified packet. Then, the VSwitch would use the second addressing modetable from the second PAN on the modified packet, to obtain a new packetto send down the stack until the final packet is sent on the physicalnetwork. This process is described in FIG. 9A, where there are N layersor network overlays. At each level, the packet suffers a potentialtransformation as previously described, and then the packet is handed tothe next layer until the packet reaches the Physical NIC.

In another embodiment, instructions are obtained at each layer and thelast layer would do the actual packet modification, including therequired translations, encapsulations, etc. In yet another embodiment,as shown in FIG. 9B, the multiple layers are consolidated into twological layers, the top network overlay interfacing with the VM and thebottom network overlay interfacing with the Physical NIC. The packetmodification tasks are done at the top overlay, or the bottom overlay,or the tasks are split between the top and the bottom network overlay.Further, in one more embodiment, a single network overlay layer (notshown) is used that performs all the tasks required for each and everynetwork overlay.

FIG. 10 shows the process flow for implementing private allocatednetworks in a virtual infrastructure in accordance with one embodimentof the invention. In operation 1002, a plurality of virtual switches arecreated in one or more hosts in the virtual infrastructure, where eachport in the plurality of virtual switches is associated with a privateallocated network (PAN) from a plurality of PANs. See for example, FIGS.3-6 where virtual switches are created in each of the hosts. Intranettraffic within each PAN is not visible to nodes that are not connectedto the each PAN.

Further, in operation 1004 the method defines addressing mode tables forthe intranet traffic within each PAN, where an entry in the addressingmode tables defines an addressing function for routing the intranettraffic between the virtual switches. Different types of addressingfunctions are supported by the virtual switches, as seen for example inthe embodiments of FIGS. 7A-7B.

FIG. 11 is a simplified schematic diagram of a computer system forimplementing embodiments of the present invention. It should beappreciated that embodiments of the invention described herein may beperformed with a digital processing system, such as a conventional,general-purpose computer system. Special purpose computers, which aredesigned or programmed to perform only one function may be used in thealternative. As shown in FIG. 11 , the computer system includes acentral processing unit 1104, which is coupled through bus 1110 torandom access memory (RAM) 1106, read-only memory (ROM) 1112, and massstorage device 1114. Program 1108 resides in RAM 1106, but can alsoreside in mass storage 1114. Program 1108 can include a virtual machine,a virtual router, and other programs used to implement embodiments ofthe invention. Mass storage device 1114 represents a persistent datastorage device such as a floppy disc drive or a fixed disc drive, whichmay be local or remote. Network interface 1130 provides connections vianetwork 1132, allowing communications with other devices. It should beappreciated that Central Processing Unit (CPU) 1104 may be embodied in ageneral-purpose processor, a special purpose processor, or a speciallyprogrammed logic device. Input/Output (I/O) interface providescommunication with different peripherals and is connected with CPU 1104,RAM 1106, ROM 1112, and mass storage device 1114, through bus 1110.Sample peripherals include display 1118, keyboard 1122, cursor control1124, removable media device 1134, etc.

Display 1118 is configured to display the user interfaces describedherein. Keyboard 1122, cursor control 1124, removable media device 1134,and other peripherals are coupled to I/O interface 1120 in order tocommunicate information in command selections to CPU 1104. It should beappreciated that data to and from external devices may be communicatedthrough I/O interface 1120.

Embodiments of the present invention may be practiced with variouscomputer system configurations including hand-held devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers and the like. Theinvention can also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a network.

With the above embodiments in mind, it should be understood that theinvention can employ various computer-implemented operations involvingdata stored in computer systems. These operations are those requiringphysical manipulation of physical quantities. Any of the operationsdescribed herein that form part of the invention are useful machineoperations. The invention also relates to a device or an apparatus forperforming these operations. The apparatus may be specially constructedfor the required purpose, such as a special purpose computer. Whendefined as a special purpose computer, the computer can also performother processing, program execution or routines that are not part of thespecial purpose, while still being capable of operating for the specialpurpose. Alternatively, the operations may be processed by a generalpurpose computer selectively activated or configured by one or morecomputer programs stored in the computer memory, cache, or obtained overa network. When data is obtained over a network the data maybe processedby other computers on the network, e.g., a cloud of computing resources.

The embodiments of the present invention can also be defined as amachine that transforms data from one state to another state. Thetransformed data can be saved to storage and then manipulated by aprocessor. The processor thus transforms the data from one thing toanother. Still further, the methods can be processed by one or moremachines or processors that can be connected over a network. Themachines can also be virtualized to provide physical access to storageand processing power to one or more users, servers, or clients. Thus,the virtualized system should be considered a machine that can operateas one or more general purpose machines or be configured as a specialpurpose machine. Each machine, or virtual representation of a machine,can transform data from one state or thing to another, and can alsoprocess data, save data to storage, display the result, or communicatethe result to another machine.

The invention can also be embodied as computer readable code on acomputer readable medium. The computer readable medium is any datastorage device that can store data, which can be thereafter be read by acomputer system. Examples of the computer readable medium include harddrives, network attached storage (NAS), read-only memory, random-accessmemory, CD-ROMs, CD-Rs, CD-RWs, magnetic tapes and other optical andnon-optical data storage devices. The computer readable medium caninclude computer readable tangible medium distributed over anetwork-coupled computer system so that the computer readable code isstored and executed in a distributed fashion.

Although the method operations were described in a specific order, itshould be understood that other housekeeping operations may be performedin between operations, or operations may be adjusted so that they occurat slightly different times, or may be distributed in a system whichallows the occurrence of the processing operations at various intervalsassociated with the processing, as long as the processing of the overlayoperations are performed in the desired way.

Although the foregoing invention has been described in some detail forpurposes of clarity of understanding, it will be apparent that certainchanges and modifications can be practiced within the scope of theappended claims. Accordingly, the present embodiments are to beconsidered as illustrative and not restrictive, and the invention is notto be limited to the details given herein, but may be modified withinthe scope and equivalents of the appended claims.

1-23. (canceled)
 24. For a controller, a method for managing avirtualized infrastructure, the method comprising: assigning a set ofvirtual machines on a particular private allocated network (PAN) to aset of host machines in a network of host machines, wherein a pluralityof PANs are implemented within the network; generating, for each hostmachine of the set of host machines, a different addressing mode tablethat specifies, for a virtual switch on the host machine, rules forforwarding packets within the particular PAN, wherein the addressingmode table for a first host in the set is different from the addressingmode table for a second host in the set; and distributing the generatedaddressing mode tables to the set of host machines in order for the hostmachines to forward packets between virtual machines assigned to theparticular PAN.
 25. The method of claim 24, wherein the addressing modetable for the first host comprises a plurality of entries for forwardingpackets to virtual machines assigned to the particular PAN.
 26. Themethod of claim 25, wherein the particular virtual machine is located inthe first host.
 27. The method of claim 25, wherein the particularvirtual machine is located on a third host, the first host is on a sameL2 network as the third host, and the second host is on a different L2network as the third host.
 28. The method of claim 24, wherein theparticular PAN is a first PAN, the method further comprising: assigninga second set of virtual machines on a second PAN to a second set of hostmachines in the network; generating, for each host machine of the secondset of host machines, a different addressing mode table that specifies,for a virtual switch on the host machine of the second set of hostmachines, rules for forwarding packets within the second PAN; anddistributing the generated addressing mode tables to the second set ofhost machines in order for the host machines to forward packets betweenvirtual machines assigned to the second PAN.
 29. The method of claim 28,wherein at least one host machine is in both the first set of hostmachines and the second set of host machines.
 30. The method of claim24, wherein assigning the set of virtual machines to the set of hostmachines comprises: assigning each virtual machine to a correspondingport of a host machine; and assigning the corresponding ports to theparticular PAN.
 31. For a virtual switch operating in a host machine, amethod for forwarding packets between virtual machines residing on aplurality of host machines, the method comprising: receiving, from acentralized controller, an addressing mode table for a particularprivate allocated network (PAN), the addressing mode table specifyingdifferent addressing functions for use in forwarding packets todifferent virtual machines on the PAN; receiving a packet from a firstvirtual machine through a port of the virtual switch, the particularport assigned to the particular PAN; looking up an addressing functionto use in forwarding the packet to a destination virtual machine;modifying the packet as specified by the addressing function; andsending the modified packet to the destination virtual machine.
 32. Themethod of claim 31, wherein modifying the packet comprises translating aPAN-specific layer 2 address to a unique layer 2 address.
 33. The methodof claim 32, wherein a plurality of different PANs are implemented byvirtual switches operating in the host machines, wherein thePAN-specific layer 2 address is an address used within the particularPAN as the layer 2 address for the destination virtual machine, whereinthe PAN-specific layer 2 address is also used within a different PAN asthe layer 2 address for a different virtual machine.
 34. The method ofclaim 31, wherein modifying the packet comprises encapsulating thepacket with an IP address of a host machine on which the destinationvirtual machine resides.
 35. The method of claim 31 further comprising:receiving a second packet from the first virtual machine, wherein thesecond packet is addressed to a second virtual machine assigned to thePAN, the second virtual machine also residing on the host machine; andsending the second packet to the second virtual machine withoutmodification.
 36. The method of claim 31, wherein the packet is abroadcast packet to all virtual machines assigned to the PAN, whereinmodifying the packet comprises converting the broadcast packet to amulticast packet for a predefined multicast group.
 37. A systemcomprising: a plurality of host machines that each comprise a virtualswitch for forwarding packets between virtual machines that reside onthe host machines, wherein each virtual machine is assigned to a privateallocated network (PAN), wherein virtual machines on a same PANcommunicate with each other and not with virtual machines on differentPANs; and a controller for generating, for each host machine in theplurality of host machines, a set of addressing mode tables that specifyrules for forwarding packets between virtual machines in a PAN anddistributing the addressing mode tables to the host machines, whereineach host machine receives from the controller an addressing mode tablefor each PAN to which any one of its virtual machines belongs, wherein afirst host machine and a second host machine receive differentaddressing mode tables for a particular PAN.
 38. The system of claim 37,wherein the plurality of host machines update the addressing modetables.
 39. The system of claim 37, wherein when a particular virtualmachine assigned to the particular PAN migrates from a third hostmachine to a fourth host machine on which the particular PAN is notimplemented, the controller generates a new addressing mode table forthe particular PAN for the fourth host machine and distributes the newaddressing mode table to the fourth host machine.
 40. The system ofclaim 37, wherein the addressing mode table for the first host machinefor the particular PAN specifies using L2 translation for packets sentto a particular destination virtual machine while the addressing modetable for the second host machine for the particular PAN specifies usingL3 encapsulation for packets sent to the particular destination virtualmachine.
 41. The system of claim 37, wherein the addressing mode tablefor the first host machine for the particular PAN specifies using L2translation for packets sent to a particular destination virtual machinewhile the addressing mode table for the second host machine for theparticular PAN specifies not modifying the packet for sending to theparticular destination virtual machine.
 42. The system of claim 41,wherein the particular destination virtual machine resides on the secondhost machine.